import requests
from lxml import  etree
url="http://www.techlabplt.com:8080/BD-PC/static.html"
res=requests.get(url)
res.encoding='utf-8'
selector=etree.HTML(res.text)
print(etree.tostring(selector.xpath('//head')[0]))
print(selector.xpath('//head/text()'))
print(selector.xpath('//head')[0].xpath('string()'))
